// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 商品管理
import Goods from '@/views/goods/Goods';
// 机器信息管理
import Machine from '@/views/machine/Machine';
// 货道信息管理
import MachineAisle from '@/views/machine/MachineAisle';
/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';
import particulars from '@/views/system/particulars';
//巡检员管理
import Inspector from '@/views/system/Inspector';
// 菜单管理
import Module from '@/views/system/Module';
//统计图
import Echarts from '@/views/system/Echarts';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';
/**
 * 支付管理
 */
// 支付配置信息
import MachineConfig from '@/views/machine/MachineConfig';
// 支付配置
import Config from '@/views/pay/Config';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';

//车辆管理
import Tcar from '@/views/TCar/Tcar';
// 车辆管理里面的子路由，订单记录
import TcarOrderRecord from '@/views/TCar/TcarOrderRecord';

//路段管理
import section from '@/views/TSection/section';

//订单管理
import OrderItem from '@/views/TOrderItem/OrderItem';

//路段车位管理
import parking from '@/views/TSection/parking';

//订单管理中的订单详情
import OrderDetails from '@/views/TOrderItem/OrderDetails';

//异常订单管理
import UnusnalOrderManagement from '@/views/TOrderItem/UnusnalOrderManagement';

//异常订单管理中的订单详情
import UnusnalOrderDetials from '@/views/TOrderItem/UnusnalOrderDetials';

//修改个人信息
import updateAdmin from '@/views/updateAdmin';
//设备管理中的地磁管理
import TGeo from '@/views/TGeo/TGeo';

import Admin from '@/views/system/admin';

import Fback from '@/views/fback/fback';

import GeoLog from '@/views/TGeo/GeoLog';
import PDA from '@/views/TGeo/PDA';

// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/user',
            name: '用户管理',
            component: user,
          
        },{
            path: '/Inspector',
            name: '巡检员管理',
            component: Inspector,
          
        },{
            path: '/system/Echarts',
            name: 'Echarts',
            component: Echarts,
          
        }, {
            path: '/system/particulars',
            name: '查看详情',
            component: particulars,
          
        },{
            path: '/Tcar',
            name: '车辆管理',
            component: Tcar,
            meta: {
                requireAuth: true
            },
        },{
            path: '/TCar/TcarOrderRecord',
            name: '订单记录',
            component: TcarOrderRecord,
            meta: {
                requireAuth: true
            }
        },{
            path: '/section',
            name: '路段管理',
            component: section,
            meta: {
                requireAuth: true
            }
        },{
            path: '/OrderItem',
            name: '订单管理',
            component: OrderItem,
            meta: {
                requireAuth: true
            }
        },{
            path: '/TSection/parking',
            name: '路段车位管理',
            component: parking,
            meta: {
                requireAuth: true
            }
        },{
            path: '/TOrderItem/OrderDetails',
            name: '订单管理中的订单详情',
            component: OrderDetails,
            meta: {
                requireAuth: true
            }
        },{
            path: '/UnusnalOrderManagement',
            name: '异常订单管理',
            component: UnusnalOrderManagement,
            meta: {
                requireAuth: true
            }
        },{
            path: '/TOrderItem/UnusnalOrderDetials',
            name: '异常订单详情',
            component: UnusnalOrderDetials,
            meta: {
                requireAuth: true
            }
        },{
            path: '/updateAdmin',
            name: '修改个人信息',
            component: updateAdmin,
            meta: {
                requireAuth: true
            }
        },{
            path: '/TGeo',
            name: '地磁管理',
            component: TGeo,
            meta: {
                requireAuth: true
            }
        },{
            path: '/admin',
            name: '管理员操作',
            component: Admin,
            meta: {
                requireAuth: true
            }
        },{
            path: '/role',
            name: '角色管理',
            component: Role,
            meta: {
                requireAuth: true
            }
        },{
            path: '/Permission',
            name: '权限管理',
            component: Permission,
            meta: {
                requireAuth: true
            }
        },{
            path: '/fback',
            name: '反馈管理',
            component: Fback,
            meta: {
                requireAuth: true
            }
        },{
            path: '/GeoLog',
            name: '地磁日志',
            component: GeoLog,
            meta: {
                requireAuth: true
            }
        },{
            path: '/PDA',
            name: 'PDA管理',
            component: PDA,
            meta: {
                requireAuth: true
            }
        },]
    }]
})